The present invention relates to method and apparatus of image composite processing for composing a plurality of images to be outputted as a single image, and more particularly, to method and apparatus for composing a plurality images each having a duplicate area into a single image.
Conventionally, an image reading apparatus generally reads an image in the following manner. That is, an original document is placed on a transparent document table made of glass or the like, and optically scanned with a beam of light emitted from a light source. The resulting reflected light is formed into an image at a photo-receiving section of a photoelectric transfer element serving as a reading element, such as a CCD (Charge Coupled Device). Then, the resulting optical signal is converted into an analog electric signal in each element. Further, the analog electric signal is outputted in the form of a digital electric signal by means of an A/D convertor or the like, whereby image data are obtained.
When a range of the document table on which an original document can be placed is limited, or when an image forming range is limited, the above image reading apparatus can not read an entire image in a single reading action. For example, since an image forming range of the photo-receiving section of the CCD is limited, the photo-receiving section can not read an image on a large-size document in a single action. Thus, the image has to be divided into a plurality of sections, and each is read separately. For this reason, an image on the original document is divided into a plurality of sections and an image in each section is read separately first, and thence a plurality of resulting images are composed to be outputted as image data on a single sheet.
In such a case, when the read images are composed, the junctions of the images should be matched with each other very precisely. However, when an original document is placed on the document table per section by the user to be read, the position of the junction has to be detected. Moreover, if there is an area having no matching junction, the image data should be processed in a special manner to create a natural composite image. In other words, there is a problem that, when the junctions do not match with each other, very troublesome jobs, such as interpolation, are required, thereby extending the processing time undesirably.
In contrast, if an original document is not placed on the document table manually but fed to the document table mechanically, or the reading apparatus is arranged to divide an original document placed on the document table into a plurality of sections and read each section, an image in each section is read after the original document is divided precisely at the laminated portion of the junctions. Accordingly, the matching detection is simplified and the images in the divided sections can be outputted as a single natural image.
However, there still arises a problem of mechanical accuracy in the automatic feeding of the original document and in the movement of the reading optical system. Thus, although the original document can be placed more accurately than being placed manually to a predetermined position, mechanical errors and the like cause a problem that the interpolation processing and composite processing take too long.
To solve the above problem, for example, Japanese Laid-open Patent Application No. 122606/1993 (Tokukaihei No. 5-122606) proposes an image composite processing method, which will be briefly explained in the following with reference to FIG. 10.
Here, an image 101 of FIG. 10(a) and an image 102 of FIG. 10(b) are composite subject images on an original document divided into two sections and read by an image forming apparatus equipped with the CCD.
The composite subject images 101 and 102 are formed in such a manner that each has a duplicate portion (areas 105 and 104) of an object (read image) 103, and each composite subject image is divided into a plurality of images. When the composite subject images 101 and 102 are monochromic images, each pixel includes luminance (density of image and the like) information.
On the other hand, when the composite subject images 101 and 102 are color images, each pixel includes color information, such as chromaticity.
An end area 104 is an area of the composite subject image 102 at the end which will be laminated to the composite subject image 101. A lamination area 105 is an area of the composite subject image 101 including a partial duplicate area of the end area 104 of the composite subject image 102.
In the above image composite processing method, when the composite subject images 101 and 102 are monochromic images, differences of the luminance values between the pixels on the end area 104 of the composite subject image 102 and those on the lamination area 105 of the composite subject image 101 are computed and added up.
When the composite subject images 101 and 102 are color images, an image composite processing apparatus computes differences of the chromaticity between the pixels on the end area 104 and those one the lamination area 105 and adds up the same.
In the above image composite processing method, after the above computation, an area where a total of the differences of the luminance values or chromaticity becomes 0 or a minimum value is found in the lamination area 105. More specifically, an area taken out from the image 101 is shifted to the left per pixel while the comparison with the end area 104 is being carried out until an area where the differences of the luminance values or chromaticity becomes 0 or a minimum value is found. When the lamination area 105 such that satisfies the above condition is obtained, the image composite processing apparatus composes the composite subject images 101 and 102 in such a manner that the end area 104 overlaps the lamination area 105, whereby a composite image 106 as shown in FIG. 10(c) is obtained.
According to the above method, areas that should be composed can be found accurately by finding the duplicate areas, thereby making it possible to obtain a natural composite image regardless of mechanical accuracy errors or the like. Moreover, the finding action is accelerated and the composite processing is carried out accurately.
However, the above conventional method has a problem as follows. That is, when an image is formed, an unwanted image is also formed occasionally on the lamination area of one of the composite subject images. Examples of such an unwanted image are an image formed when light is scattered by flaws or the like on the camera lens of the image forming apparatus equipped with the CCD, and an image formed by stain or dust. When this happens, the unwanted image is directly outputted in the composite image in the conventional method.
In other words, as shown in FIG. 10(a), when an unwanted image (noise image) 107, which is not found in the original image 103, is outputted through the CCD for the above reason, the noise image 107, which should not have been formed, is formed on the resulting composite image 103 as well.
The present invention is devised to solve the above problems, and it is therefore an object of the present invention to provide method and apparatus of image composite processing which can output a desired composite image even when an unwanted image is formed on a composite area on one of composite subject images by eliminating such an unwanted image.
To fulfill the above and other objects, an image composite processing method of the present invention is an image composite processing method for composing a plurality of images, each having a duplicate area, into a single composite image based on a retrieved duplicate area, wherein the plurality of images are composed into the single composite image by comparing the duplicate areas of every two adjacent composite subject images, and adopting one of the duplicate areas based on a comparison result.
According to the above arrangement, the duplicate areas of the images in every two adjacent divided sections are searched, and one of the duplicate areas is adopted when the images in the two adjacent divided sections are composed. Thus, the duplicate areas of every two adjacent images are compared, and one of the duplicate areas is adopted for the composition based on the comparison result. Here, the duplicate area having an unwanted image is excluded from the selection subject, and the other duplicate area is used for the composite processing. Consequently, it has become possible to obtain a composite image from which the unwanted image is eliminated.
Further, when the above image composite processing method is arranged in such a manner that the duplicate areas are divided into a plurality of comparison subject areas so that the duplicate areas are compared per comparison subject area and adopted areas for composite processing are determined per comparison subject area based on the comparison result, the comparison processing can be simplified by comparing the duplicate area per comparison subject area, while an area having the unwanted image can be extracted precisely. In other words, when the duplicate areas are divided into a plurality of comparison subject areas and compared per comparison subject area, the non-matching state can be found more accurately than comparing the duplicate areas entirely.
Also, in the above image composite processing method, if each pixel value of the duplicate areas where the images are composed is added cumulatively, and which duplicate area should be adopted is determined by comparing the addition results, the duplicate area having the unwanted image can be found by employing relatively simple circuitry. Particularly, in this case, if the pixel values are added cumulatively in each of the comparison subject areas obtained by dividing the duplicate areas, there is a big difference in the comparison result as has been explained above. Hence, the comparison subject area having the unwanted image can be extracted and excluded from the composite subject in a secure manner. Consequently, the comparison subject area having no unwanted image can be adopted for the composite processing.
Further, in the above image composite processing method, before the cumulative added values of the pixel values in the duplicate areas are compared, if a total of the cumulative added values is compared with a predetermined threshold value and the image type is judged based on the comparison result, the duplicate area whose cumulative added value is the larger or smaller is determined as the adopted area based on the judged image type. In other words, the adopted area is determined based on whether the composite subject images are of the picture image type, text image type, etc. Consequently, the area having the unwanted image can be extracted more precisely, and the unwanted image can be eliminated when the images are composed.
To fulfill the above and other objects, an image composite processing apparatus of the present invention is an image composite processing apparatus for composing a plurality of images, each having a duplicate area, into a single composite image based on a retrieved duplicate area, wherein the plurality of images are composed into the single composite image by comparing the duplicate areas of every two adjacent composite subject images, and adopting one of the duplicate areas based on a comparison result.
For a fuller understanding of the nature and advantages of the invention, reference should be made to the ensuing detailed description taken in conjunction with the accompanying drawings.